package utils;

import java.util.List;

import javax.ejb.Remote;

import dtos.UserDTO;

@Remote
public interface UserDAORemote {

    public static enum UserColumns {
        USERNAME("username"), NAME("name"), DOMAIN("domain"), USERTYPE("usertype"), IS_ACTIVE("isactive"), EMAIL("email"), REPLACED_BY("replacedby");

        private String code;

        private UserColumns(String s) {
            code = s;
        }

        public String getCode() {
            return code;
        }
    }

    public static enum OrderDirection {
        ASCENDING("ASC"), DESCENDING("DESC");

        private String dir;

        private OrderDirection(String s) {
            dir = s;
        }

        public String getDir() {
            return dir;
        }
    }

	public UserDTO getUser(int id);

//	public String updateUser(UserDTO ud, String verifPass);
	
	
	public String updateUserPassword(UserDTO user, String password);

	public List<UserDTO> getAllUsersByUsername(String username);

	void insertUser(UserDTO ud);

	List<UserDTO> getAllUsersDTO();

	void deleteUser(UserDTO ud);

	void updateUsername(UserDTO user, String username);

	void updateUser(UserDTO ud);

	String updateUserProfile(UserDTO user);

	UserDTO getAdmin();

	List<UserDTO> getUsersByUsertype(int idUsertype);

	List<UserDTO> getInactiveOfficeManagers();

	UserDTO getUserDTOByEmail(String email);

	boolean isOfficeManager(UserDTO ud);

	boolean isTechnician(UserDTO ud);

	boolean isAdmin(UserDTO ud);

	boolean isBasicUser(UserDTO ud);

    public List<UserDTO> getUsersOrdered(UserColumns orderColumn, OrderDirection orderDirection);

	List<UserDTO> getUsersByDomainandUsertype(int idDomain, int idUsertype);

	void setDomainNullByDomainId(int idDomain);
	
	public List<UserDTO> getAllReplacedOfficeManagers();

	List<UserDTO> getUsersByDomain(int idDomain);
	
	void updateUserPasswordWithCodification(UserDTO user, String password);

	List<UserDTO> getActiveOfficeManagers(UserDTO curUser);



	
}
